package com.xuebusi.toutiao.test;

public class Leaf extends Component {

    private String name;

    public Leaf(String name) {
        this.name = name;
    }

    @Override
    void display(String preStr) {
        System.out.println(preStr + " - " + name);
    }
}